package com.itheima.redbaby.activity;

import java.util.List;

import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

import com.itheima.redbaby.BaseActivity;
import com.itheima.redbaby.GloableParams;
import com.itheima.redbaby.MainActivity;
import com.itheima.redbaby.R;
import com.itheima.redbaby.bean.CartProduct;
import com.itheima.redbaby.dao.CartDao;
import com.itheima.redbaby.dao.domain.CartTable;
import com.itheima.redbaby.factory.DaoAndEngineFactory;

public class CartEmptyActivity extends BaseActivity implements OnClickListener{
	//去逛逛按钮
	private TextView shopcar_empty_continuebuy;
	//返回按钮
	private TextView shopcar_back_text;
	
	private Intent intent;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		init();
	}
	public void init(){
		setContentView(R.layout.shopping_car_activity);
		shopcar_empty_continuebuy=(TextView) findViewById(R.id.shopcar_empty_continuebuy);
		shopcar_back_text=(TextView) findViewById(R.id.shopcar_back_text);
		
		shopcar_empty_continuebuy.setOnClickListener(this);
		shopcar_back_text.setOnClickListener(this);
		
	}
	@Override
	protected void onDestroy() {
		super.onDestroy();
		GloableParams.isBottomEnter=false;
	}
	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.shopcar_empty_continuebuy:
			intent=new Intent(CartEmptyActivity.this,HomeActivity.class);
			startActivity(intent);
			finish();
			break;

		case  R.id.shopcar_back_text:
			/*intent=new Intent(CartEmptyActivity.this,HomeActivity.class);
			startActivity(intent);*/
			finish();
			break;
			
		}
	}
	
}
